home *** CD-ROM | disk | FTP | other *** search
/ Interactive Media Design Review 1999 / Interactive Media Design Review 1999.iso / pc / Demos / Bombardier_PC / DATACH.CST / 00327_Script_mappy < prev    next >
Text File  |  1999-03-07  |  3KB  |  103 lines

  1. property Rimage,Dimage,image,sprt, pair
  2. on getPropertyDescriptionList
  3.   set description=[:]
  4.   --  addProp description,#Rimage,[#default:"",#format:#integer, ¼
  5. --  #comment:"The cast num for rollover image"]
  6.   --  
  7.   --  addProp description,#Dimage,[#default:"",#format:#integer, ¼
  8. --  #comment:"The cast num for the image when the mouse is down"]
  9.   --  
  10.   --  addProp description,#image,[#default:"",#format:#integer, ¼
  11. --  #comment:"The cast num for the image when not rolled over"]
  12.   
  13.   addProp description,#sprt,[#default:"",#format:#integer, ¼
  14.   #comment:"The sprite number "]
  15.   
  16.   addProp description,#pair,[#default:"",#format:#integer, ¼
  17.   #comment:"The city pair sprite number "]
  18.   --  put "*:"&description
  19.   return description
  20. end
  21.  
  22. on get behaviorDescription
  23.   return "changes the image on rollover"
  24. end
  25.  
  26.  
  27. on mouseEnter me
  28.   global gsprt, gpair
  29.   if (gsprt <> sprt) and (sprt <>  gpair)then
  30.     turnred sprt
  31.     if pair<>0 then
  32.       if (pair <> gpair) and (pair <> gsprt) then
  33.         turnred pair
  34.       end if
  35.     end if
  36.     -- set the ink of sprite sprt to 0
  37.     updatestage 
  38.   end if
  39. end
  40.  
  41. on mouseleave
  42.   global gSubch, gpair, gsprt
  43.   if (gSubch <> sprt) then
  44.     if (gsprt <> sprt) and (gpair <> sprt) then
  45.       removered sprt
  46.       if pair<>0 then
  47.         if (pair <> gpair) and (pair <> gsprt) then
  48.           removered pair
  49.         end if
  50.       end if
  51.     end if
  52.     --set the ink of sprite sprt to 1
  53.     updatestage
  54.   end if
  55. end
  56.  
  57. on removered spritenumber
  58.   set xnme = the name of member the castnum of sprite spritenumber
  59.   if xnme contains "red" then
  60.     set xmel = length(xnme) - 4
  61.     set xout = char 1 to xmel of xnme
  62.     set the member of sprite spritenumber = xout
  63.   end if
  64. end
  65. on turnred spritenumber
  66.   set xnme = the name of member the castnum of sprite spritenumber
  67.   if xnme contains "red" then
  68.     nothing
  69.   else
  70.     set xout = xnme & " red"
  71.     set the member of sprite spritenumber = xout
  72.   end if
  73. end
  74.  
  75. on mouseup me
  76.   global gSubch,gSImage,gMode, gsprt, gpair
  77.   removered(3)
  78.   repeat with slop = 24 to 34
  79.     removered(slop)
  80.   end repeat  
  81.   set the visible of sprite gsprt = true
  82.   set the visible of sprite gpair = true
  83.   --  set the castnum of sprite sprt to the castnum of sprite sprt -1
  84.   --  set the castnum of sprite pair to the castnum of sprite pair -1
  85.   set the visible of sprite sprt = false
  86.   set the visible of sprite pair = false
  87.   set gsprt = sprt
  88.   set gpair = pair
  89.   updatestage
  90.   set gMode="menu"
  91.   
  92.   --  if gSub <> sprt and gSub <>"" then
  93.   --    set the castnum of sprite gSub to gSImage 
  94.   --  end if
  95.   
  96.   if gSubch <> sprt then
  97.     set gSubch = sprt
  98.     --    set gSImage = Image
  99.   end if
  100.   pass
  101. end
  102.  
  103.